//
//  aboutUsViewController.m
//  FreshBee
//
//  Created by 姜 祥云 on 16/10/15.
//  Copyright © 2016年 iOS013. All rights reserved.
//

#import "aboutUsViewController.h"
#import "WebViewController.h"

@interface aboutUsViewController ()

@end

@implementation aboutUsViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    self.title=@"关于小熊";
    self.view.backgroundColor=[UIColor whiteColor];
    
    UIImage *image1=[UIImage imageNamed:@"author"];
    UIImageView *imagV=[[UIImageView alloc]initWithImage:image1];
    [self.view addSubview:imagV];
    [imagV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view.mas_top).offset(self.view.bounds.size.height/5);
        make.centerX.equalTo(self.view);
    }];
    
    UILabel *versionLabel=[[UILabel alloc]init];
    versionLabel.text=@"版本 3.60 Bulid 239";
    [self.view addSubview:versionLabel];
    [versionLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(imagV.mas_bottom).offset(20);
        make.centerX.equalTo(self.view);
    }];
    
    UILabel *allowNumber=[[UILabel alloc]init];
    allowNumber.text=@"食品流通许可证编号:SP1101230124313492130(1-1)";
    allowNumber.font=[UIFont systemFontOfSize:12];
    allowNumber.textColor=[UIColor lightGrayColor];
    [self.view addSubview:allowNumber];
    [allowNumber mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.equalTo(self.view.mas_bottom).offset(-11);
        make.centerX.equalTo(self.view);
    }];
    
    UILabel *ICPNumber=[[UILabel alloc]init];
    ICPNumber.text=@"京ICP证150771号";
    ICPNumber.font=[UIFont systemFontOfSize:12];
    ICPNumber.textColor=[UIColor lightGrayColor];
    [self.view addSubview:ICPNumber];
    [ICPNumber mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.equalTo(allowNumber.mas_top).offset(-5);
        make.centerX.equalTo(self.view);
    }];
    
    UILabel *Weixin=[[UILabel alloc]init];
    Weixin.text=@"微信: beequick24";
    Weixin.font=[UIFont systemFontOfSize:12];
    [self.view addSubview:Weixin];
    [Weixin mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.equalTo(ICPNumber.mas_top).offset(-15);
        make.centerX.equalTo(self.view).offset(10);
    }];

    
    UIImage *WeixinImage=[UIImage imageNamed:@"v2_weixin"];

    UIImageView *WeixinImageV=[[UIImageView alloc]initWithImage:WeixinImage];
    //开启交互
            WeixinImageV.userInteractionEnabled = YES;
    [self.view addSubview:WeixinImageV];
    //定义手势 ->添加到图片-->定义动作方法
    UITapGestureRecognizer *tap=[[UITapGestureRecognizer alloc]init];
    [WeixinImageV addGestureRecognizer:tap];
    [tap addTarget:self action:@selector(didClick)];
    
    [WeixinImageV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(Weixin.mas_left).offset(-5);
        make.top.equalTo(Weixin);
        make.width.height.equalTo(@15);
    }];
    
    
}

-(void)didClick
{
    WebViewController *baiduV=[[WebViewController alloc]init];

    

    
    NSLog(@"wer");
    
    //两个界面之间没有很大关联 用present
    [self.navigationController presentViewController:baiduV animated:YES completion:^{
        
    }];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
